package com.erp.service.produtccategory.impl;

import com.erp.domain.ErpProductCategory;
import com.erp.mapper.productcategory.ProductCategoryMapper;
import com.erp.service.produtccategory.IPorductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * --- 代码敲对！ ---
 *
 * @author CCCccc
 * @create 2025/9/2
 * 备注：商品分类业务层实现类
 */
@Service
public class PorductCategoryImpl implements IPorductCategoryService {
    // 自动注入
    @Autowired
    private ProductCategoryMapper productCategoryMapper;

    // 查询商品分类列表
    @Override
    public List<ErpProductCategory> list(ErpProductCategory erpProductCategory) {
        return productCategoryMapper.list(erpProductCategory);
    }

    // 更新商品分类
    @Override
    public int update(ErpProductCategory category) {
        return productCategoryMapper.update(category);
    }

    // 新增商品分类
    @Override
    public int add(ErpProductCategory category) {
        return productCategoryMapper.add(category);
    }


}
